[go-nuts] Re: [security] Go 1.7.6 and Go 1.8.2 are released

2017-05-23 Thread Nathan Kerr
I updated my Go Release Timeline with these updates: https://pocketgophers.com/go-release-timeline/#go1.8.2 On Tuesday, May 23, 2017 at 9:28:01 PM UTC+2, Chris Broadfoot wrote: > > A security-related issue was recently reported in Go's crypto/elliptic > package. > To address this issue, we have

[go-nuts] Re: bash completion for flag package

2017-05-23 Thread Eyal Posener
No subcommand options :-) On Wednesday, May 24, 2017 at 3:21:23 AM UTC+3, Will Faught wrote: > > Can it complete subcommands? > > By the way, there's a small syntax error in the readme example: > []string{"work", "dring} > > On Tuesday, May 23, 2017 at 12:21:07 PM UTC-7, Eyal Posener wrote: >> >>

[go-nuts] Re: [security] Go 1.7.6 and Go 1.8.2 are released

2017-05-23 Thread Henry
That's it. Thanks. On Wednesday, May 24, 2017 at 10:02:18 AM UTC+7, Marvin Stenger wrote: > > https://groups.google.com/forum/#!forum/golang-announce > > Am Mittwoch, 24. Mai 2017 04:58:43 UTC+2 schrieb Henry: >> >> Is there some kind of a mailing list (for Go releases only), so that we >> can be

[go-nuts] Re: [security] Go 1.7.6 and Go 1.8.2 are released

2017-05-23 Thread Marvin Stenger
https://groups.google.com/forum/#!forum/golang-announce Am Mittwoch, 24. Mai 2017 04:58:43 UTC+2 schrieb Henry: > > Is there some kind of a mailing list (for Go releases only), so that we > can be notified of new releases via email? > > -- You received this message because you are subscribed to

Re: [go-nuts] netutil.LimitListener(lis, n) limits to n-2 requests

2017-05-23 Thread Kevin Conway
I'm speculating a bit here until I can dig back into the listener stack, but at least one variable you can tweak is the connection keep alive. On the surface, limit listener appears to gate on the socket accept call. I feel it is an important distinction because it limits the listener and not the r

[go-nuts] Re: [security] Go 1.7.6 and Go 1.8.2 are released

2017-05-23 Thread Henry
Is there some kind of a mailing list (for Go releases only), so that we can be notified of new releases via email? On Wednesday, May 24, 2017 at 2:28:01 AM UTC+7, Chris Broadfoot wrote: > > A security-related issue was recently reported in Go's crypto/elliptic > package. > To address this issue,

[go-nuts] Re: bash completion for flag package

2017-05-23 Thread Will Faught
Can it complete subcommands? By the way, there's a small syntax error in the readme example: []string{"work", "dring} On Tuesday, May 23, 2017 at 12:21:07 PM UTC-7, Eyal Posener wrote: > > I recently did the complete package , > that enables bash completion

[go-nuts] minimum b.N

2017-05-23 Thread jonathan . gaillard
I don't think there is a way, but is there a way to specify a minimum b.N? So we have a bunch of benchmarks, but some are benchmarking things that take milliseconds and some seconds. So specifying benchtime like 30s makes the whole build run too slow. -- You received this message because you a

[go-nuts] Re: How to point to pointer struct

2017-05-23 Thread alex martin
Thank you problem solved with your suggestion. var PSlv (**C.Volume) = RPointer.v lenght := int(RPointer.h.nvolumes) sliceV := (*[1 << 30](*C.Volume))(unsafe.Pointer(PSlv))[:lenght:lenght] the result is []*C.Volume correct, where the pointer is null the slice value is nil Alex On Tuesday, May

[go-nuts] [security] Go 1.7.6 and Go 1.8.2 are released

2017-05-23 Thread Chris Broadfoot
A security-related issue was recently reported in Go's crypto/elliptic package. To address this issue, we have just released Go 1.7.6 and Go 1.8.2. The Go team would like to thank Vlad Krasnov and Filippo Valsorda at Cloudflare for reporting the issue and providing a fix. The issue affects Go's

[go-nuts] bash completion for flag package

2017-05-23 Thread Eyal Posener
I recently did the complete package , that enables bash completion for the go command line. I came to be really satisfied with the result, but the package downside is that the completion can be inconsistent with the actual flags provided by the program. I tho

[go-nuts] Re: go1.8 and json.NewDecoder(resp.Body)

2017-05-23 Thread Dmitri Shuralyov
Relevant: https://github.com/google/go-github/pull/317 See the discussion and the CLs to Go std lib that Brad sent out as a result. On Tuesday, May 23, 2017 at 8:34:03 AM UTC-4, John Shahid wrote: > > Hi all, > > Some background, we (CloudFoundry) noticed some weird behavior after > upgrading f

[go-nuts] Re: negative unsigned value?

2017-05-23 Thread Val
My initial code was sloppy, sorry about that. But you get the idea: testing if uint is "less than zero" is sometimes legit. func log(msg string, level uint) { if level < appLevel { return } triggerBigNetworkLogTool(msg) } https://play.golang.org/p/v-7OcDCzmj On Tuesday, May 23, 2017

[go-nuts] Re: negative unsigned value?

2017-05-23 Thread Val
FWIW, consider first that : if false { foo() bar() } is legal (and sometimes recommended by autorities, as opposed to momentarily commenting out a block, and struggling with unused vars); and second that : func log(msg string, level uint) { if level < appLevel { triggerBigNetworkLogTo

[go-nuts] Re: go1.8 and json.NewDecoder(resp.Body)

2017-05-23 Thread Jim Robinson
I'd suggest the latter, drain the reader as the last step. Perhaps define a DrainReadCloser that can fully drain the input ReadCloser as part of its closing operation? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this g

[go-nuts] Re: How to point to pointer struct

2017-05-23 Thread Pablo Rozas Larraondo
I'm thinking about the possibility of having something like [][]Volume in Go. Do you know the size or number of Volumes in your struct? There's an example of converting **char into []string that might be useful: https://stackoverflow.com/questions/36188649/cgo-char-to-slice-string On Tuesday,

Re: [go-nuts] Re: issues about struct align

2017-05-23 Thread Marvin Renich
* Marvin Renich [170523 08:58]: > Looking more closely at the MSDN docs for FwpmFilterAdd0 and > FWPM_FILTER0, if I were doing this, I might use «RawContext uint64» > instead of «ProviderContextKey GUID», which would be properly aligned > without manual padding. I would then convert this value ma

[go-nuts] Re: set source path in delve

2017-05-23 Thread 傅伟
Hi, I am switching from gdb to delve. I think the following statement can help you. {{{ (dlv) funcs regep (dlv) list funcName }}} 在 2017年4月1日星期六 UTC+8下午12:58:24,YZ Xie写道: > > Hi all, > > I have meet source path problem, > > there exits two question. > 1. when use ls to list source code, i

Re: [go-nuts] Re: issues about struct align

2017-05-23 Thread Marvin Renich
* xjdrew [170523 02:31]: > Marvin, thanks. > > What i'm doing is similar to your guessing. > > I use syscall.Syscall to call win32 api, and encounter some padding issues. > I have resolve my problems by mannual padding days ago, but I want to know > if there is a more graceful way to finish tha

Re: [go-nuts] go1.8 and json.NewDecoder(resp.Body)

2017-05-23 Thread Ian Davis
On Tue, 23 May 2017, at 01:33 PM, John Shahid wrote: > The only way I can think of to fix this is either using > ioutil.ReadAll(resp.Body) combined with json.Unmarshal, or use > json.NewDecoder() followed by ioutil.ReadAll and discard the result.> What do > you all think ? > I noticed just

[go-nuts] go1.8 and json.NewDecoder(resp.Body)

2017-05-23 Thread John Shahid
Hi all, Some background, we (CloudFoundry) noticed some weird behavior after upgrading from go1.7.4 to go1.8.1. An http client that was polling 260 servers started showing more timeouts after the upgrade. After investigating the issue we realized that the following pattern combined with tls connec

[go-nuts] Re: negative unsigned value?

2017-05-23 Thread ojucie
Now I understand it. Thank you, guys. -- 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...@googlegroups.com. For more options, visit https://gr

[go-nuts] netutil.LimitListener(lis, n) limits to n-2 requests

2017-05-23 Thread Pablo Rozas Larraondo
Hi gophers, I'm using netutil.LimitListener to limit the number of concurrent requests that can be handled in a server to limit the memory usage of the service. I've noticed that when I send a bunch of requests it serves the number passed to the LimitListerner but after that it serves n-2 requests

[go-nuts] How to point to pointer struct

2017-05-23 Thread alex martin
Hi I have this structure in C created by rsl libray typedef struct { Radar_header h; Volume **v; } Radar; Using cgo i read the structure with Radar *readRad(char *fname) { return RSL_anyformat_to_radar(fname, NULL); } and call this function in go RPointer := C.readRad(C.CSt

[go-nuts] Build Go with Gradle instead of Make

2017-05-23 Thread zhangbodut
Hello guys, I have written an article to introduce how to build a Go project with Gradle instead of Make: https://github.com/gogradle/gogradle/blob/master/docs/build-go-with-gradle-en.md I hope this will provide someone with some useful information. Thanks~~~ :-) -- You received this messag