Re: [go-nuts] gofmt: one line if statement

2018-01-06 Thread 'Axel Wagner' via golang-nuts
I feel there is a significant difference between the two: func-literals are expressions, while if-statements are… statements :) i.e. I'd rather be in favor of reformatting func-literals, but I believe the fact that they are expressions makes that not a great idea, as they are often used in argument

[go-nuts] Re: Go Community Charity Work?

2018-01-06 Thread matthewjuran
“The Food and Drug Administration Safety and Innovation Act (FDASIA), signed into law on July 9, 2012, expands the FDA’s authorities and strengthens the agency's ability to safeguard and advance public health…” The FDASIA doesn’t seem to have a direct effect on this project, although they do de

[go-nuts] gofmt: one line if statement

2018-01-06 Thread Tong Sun
Hi, *[This is just a thought, no flaming please if you don't agree]* Since `gofmt` supports one line func() definition, how about maintaining one line if statement as well if the user did so? This way, many of the simple three line code can be simplified to one: I.e., from if !condition {

Re: [go-nuts] Meet "fatal morestack on g0" on Linux

2018-01-06 Thread Jan Mercl
On Sat, Jan 6, 2018, 11:16 wrote: > Thanks for your advice! I got the error message and the pstack result > screenshot from one of our client. I will try to use some OCR tools to > convert the image to text next time. > It's already text, no need for OCR. Just copy the text, not the image repr

Re: [go-nuts] Meet "fatal morestack on g0" on Linux

2018-01-06 Thread Dave Cheney
You can still check for races if you build your production binary with -race and deploy it as normal. There will be a some performance hit so you probably shouldn't do this for all your binaries, but it will be a cheap way to flush out any data races in your code. On Saturday, 6 January 2018 21

Re: [go-nuts] Meet "fatal morestack on g0" on Linux

2018-01-06 Thread shenli
Thanks for your advice! I got the error message and the pstack result screenshot from one of our client. I will try to use some OCR tools to convert the image to text next time. For the questions: 1. The binary is built without race detector flag. I have checked it. 2. We do not use cgo. I wil

[go-nuts] Re: ListenAndServ and channels

2018-01-06 Thread Amnon Baron Cohen
The global var should have been protected by a mutex, or loaded and saved using sync/atomic functions, as it is accessed from multiple goroutines. Another minor point: Why do: result := fmt.Sprintf("Hello there %s", i) io.WriteString(w, result) instead of just: fmt.Fprintf(w, "Hello there %s",

[go-nuts] Re: [mysql] 2017/12/23 11:09:37 packets.go:141: write tcp 127.0.0.1:20630->127.0.0.1:3306: write: broken pipe

2018-01-06 Thread jobs jobs
Thanks all answers! 在 2017年12月23日星期六 UTC+8下午9:23:21,jobs jobs写道: > > how to fix it? -- 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