I was not intentionally doing it. Some packages, for example mock
in https://github.com/stretchr/testify use %#v to print debug information
and this was causing a race condition in one of my failing tests because it
was printing the context with %#v while some other code in my program was
cance
I'm considering only the case when there is a concurrent print of the
context and also a concurrent context cancel.
On Friday, March 16, 2018 at 5:16:27 AM UTC-4, Jérôme Champion wrote:
>
> Any race is a bug. When there is a race, the compiler is free to do
> whatever it wants.
>
> What do you w
What do you think about offering a second variant to allow passing in the
http server? It's possible one may want to set limits or other
configuration on the HTTP server instead of using the default http server.
On Thursday, January 25, 2018 at 6:42:03 PM UTC-5, Dario Castañé wrote:
>
> I'm plea
Here is a better way to redirect from HTTPS to
HTTP:
https://github.com/nhooyr/redirecthttp/blob/d87881e4fbfddb1614c9d0934ea97c4163903301/main.go#L10-L19
Also, you don't need a secure variable in the handler, just check for r.TLS.
On Thursday, December 28, 2017 at 12:10:16 PM UTC-5, jzs wrote:
Ah I see. You mean its obvious that multiple goroutines may invoke methods
on a Conn simultaneously, your question is whether its safe or not, which
the docs do not answer.
The docs definitely intend on meaning that it is in fact safe to invoke
methods on a Conn simultaneously.
But I agree, th
Not sure where what is prompting your question, how are the docs
misleading? The docs are very clear, net.Conn is concurrency safe.
On Monday, December 18, 2017 at 7:51:26 AM UTC-5, SP wrote:
>
> In the documentation for https://golang.org/pkg/net/#Conn, it's stated
> that
>
> Multiple goroutin
OP said he does not want to litter his code with helper types.
On Sunday, December 10, 2017 at 1:30:33 PM UTC-5, Kevin Malachowski wrote:
>
> Why not name the inner type? https://play.golang.org/p/8hyMLUVbCp
--
You received this message because you are subscribed to the Google Groups
"golang-nu
Not disagreeing or agreeing but just want to mention that Brad's suggested
solution is not ideal because the a http.ResponseWriter
may implement more interfaces than just http.ResponseWriter. When you wrap
a response writer with an intercepting response writer, you cannot cast the
intercepting r
Use https://godoc.org/golang.org/x/crypto/ssh/terminal#MakeRaw to set raw
mode on the stdin terminal.
Then you can just read from os.Stdin into a single byte buffer. If the read
completes, then a key was pressed.
On Tuesday, November 28, 2017 at 12:12:44 AM UTC-5, dc0d wrote:
>
> For example I
There is an open issue regarding this behaviour.
https://github.com/golang/go/issues/21922
--
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..
Was the suggestion from this
commit
https://github.com/golang/go/commit/706832a0882c7300889238d5f4d476dc2ee83ad0
ever implemented?
--
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
I understand now. If the first IP fails, it uses the next one and so on
until it runs out of IPs or the timeout occurs.
On Tuesday, September 27, 2016 at 5:23:18 PM UTC-4, Anmol Sethi wrote:
>
> For https://godoc.org/net#Dialer , it says "When dialing a name with
> multiple IP addresses, the tim
12 matches
Mail list logo