Re: [go-nuts] Why the following code is data race free ?

2021-11-17 Thread 'Axel Wagner' via golang-nuts
[+golang-nuts again, please don't respond off-list. This is a public forum, everyone should benefit] On Thu, Nov 18, 2021 at 3:47 AM Ting Yuan wrote: > Thanks a lot, your code is very useful and explains my confusion. I think > the underlying reason is because fmt.Println grabs a global mutex so

Re: [go-nuts] Amateur question: when you should use runes?

2021-11-17 Thread Kamil Ziemian
Thank you all for answers. I have a lot to do in next few weeks, after that I will go back to runes and think more about your answers. Best, Kamil poniedziaƂek, 15 listopada 2021 o 21:52:27 UTC+1 imsach...@gmail.com napisaƂ(a): > On Tue, Nov 16, 2021 at 12:38 AM burak serdar wrote: > >> >> >>

[go-nuts] HTTP2: Stream responses but with a write timeout

2021-11-17 Thread frankre...@gmail.com
I'm confused about the current state of server timeouts being exposed by go1.17 for HTTP2 connections. With a TLS/HTTP2 server that is streaming responses to a client that has fetched and is in a readable stream loop, the stream stays up and the server sends data whenever it wants - for exampl

Re: [go-nuts] Re: pkg.go.dev jump to broken?

2021-11-17 Thread Steven Hartland
Didn't touch anything on my side and it's working again today, error has gone from the console as well, so can only assume someone fixed something. Thanks for feedback Brian :) Regards Steve On Tue, 16 Nov 2021 at 20:44, Brian Candler wrote: > Works for me: Chrome 96.0.4664.45, macOS 10.

Re: [go-nuts] SSH session.Setenv usage

2021-11-17 Thread Brian Candler
No: the "unclear" message "Failed to set env" is an error message *you* generated. You ignored the content of the "err" variable (which could have contained a detailed description of the error), and replaced it with your own bland text. Try replacing it with something like this (untested): lo

Re: [go-nuts] Trouble exporting function with anonymous struct containing anonymous fields as parameter

2021-11-17 Thread Brian Candler
The way to deal with this is to define (and export) a type which contains the hidden fields: https://play.golang.org/p/ClDxKPcNNzZ Clearly, the user of this type in another package won't be able to access the hidden fields - so usually you'd also export some sort of constructor function. -- Y