[go-nuts] Re: go install seems to do a lot of rebuilding in a container

2016-12-08 Thread shaun
> Docker add, or whatever is pushing files into your container is probably not respecting timestamps so the .a files are older with respect to .go files (pkg sorts above src) I'm bind-mounting the pkg dir in there so it shouldn't be a question of timestamps (not ruling out something going on

[go-nuts] converting slice of items into nested array

2016-12-08 Thread Tamás Gulácsi
Use capitalized field names and struct tags - lowercase is not exported, encoding/json does not see 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

Re: [go-nuts] Re: converting slice of items into nested array

2016-12-08 Thread Marvin Renich
* Mikael Gustavsson [161208 03:55]: > There's no need to use maps, you want to follow this pattern: > > for i := range items { > if i==0 || !grouped(i-1, i) { > appendToResult > } > appendToGroup > } > > Here's the full example: https://play.golang.org/p/1e0rDDmq7b

[go-nuts] Idiomatic way of handling http requests in separate goroutines

2016-12-08 Thread Tamás Gulácsi
I think this is not bad. But you can try context.Context, or simply pass in a new chan, which will be closed by the worker - so you can select, timeout on it. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and

[go-nuts] liteide x30.3 released

2016-12-08 Thread visualfc
IA== -- 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://groups.google.com/d/optout.

[go-nuts] validating self-signed certs

2016-12-08 Thread Steve Roth
I have an application that needs to talk to numerous external devices, each of which has only a self-signed cert. We can't simply accept all self-signed certs with insecureSkipVerify; instead, as part of configuring the application for each new external device, we need to import its

[go-nuts] Re: Handling nil embedded interfaces

2016-12-08 Thread Traun Leyden
After chatting w/ some gophers on twitter, I ended up with: https://play.golang.org/p/UJu4WAmkHk It defaults the embedded interface to an "no-op" implementation (NilEventLog) rather than nil, which was the best approach for my particular issue. On Wednesday, December 7, 2016 at 11:32:42 AM

re:[go-nuts] liteide x30.3 released

2016-12-08 Thread visualfc
IA== -- 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://groups.google.com/d/optout.

[go-nuts] How can I read bytes from C.Array(three levels) by using Cgo

2016-12-08 Thread Wanghb Wang
my C code Array for example: const uint8_t** kPacketMaskRandomTbl[48] = { kPacketMaskRandom1, kPacketMaskRandom2, kPacketMaskRandom3, . }; const uint8_t* kPacketMaskRandom1[1] = { kMaskRandom1_1 }; const uint8_t kMaskRandom1_1[2] = { 0x80, 0x00 }; . I want to read bytes from

[go-nuts] Re: converting slice of items into nested array

2016-12-08 Thread Mikael Gustavsson
There's no need to use maps, you want to follow this pattern: for i := range items { if i==0 || !grouped(i-1, i) { appendToResult } appendToGroup } Here's the full example: https://play.golang.org/p/1e0rDDmq7b -- You received this message because you are subscribed to the Google

Re: [go-nuts] xml omitempty for sub-elements

2016-12-08 Thread Peter Kleiweg
Four years later, and this still hasn't been fixed. The conversation you are linking to has been locked. What can we do? File a new bug report? Op donderdag 15 november 2012 13:41:55 UTC+1 schreef Vladimir Mihailenco: > > I guess you have to vote for >

Re: [go-nuts] validating self-signed certs

2016-12-08 Thread Andy Balholm
So the set of devices keeps changing. I think you can make an http.Transport with a custom DialTLS function that always uses an up-to-date TLS config. Andy -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and

Re: [go-nuts] How can I read bytes from C.Array(three levels) by using Cgo

2016-12-08 Thread Ian Lance Taylor
On Thu, Dec 8, 2016 at 12:48 AM, Wanghb Wang wrote: > my C code Array for example: > const uint8_t** kPacketMaskRandomTbl[48] = { > kPacketMaskRandom1, > kPacketMaskRandom2, > kPacketMaskRandom3, > . > }; > const uint8_t* kPacketMaskRandom1[1] = { > kMaskRandom1_1

Re: [go-nuts] validating self-signed certs

2016-12-08 Thread Andy Balholm
Why not make a tls.Config that trusts all the self-signed certs for all the different devices, and make one Transport with that config? Andy -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving

Re: [go-nuts] validating self-signed certs

2016-12-08 Thread Steven Roth
Well, because when someone wants to import a new device, I can't change the existing Transport. The docs explicitly say not to change it once it's in use. Steve On Thu, Dec 8, 2016 at 8:42 AM, Andy Balholm wrote: > Why not make a tls.Config that trusts all the

Re: [go-nuts] Deleting the /r/golang subreddit

2016-12-08 Thread Russ Cox
Although this conversation started out on the wrong foot, it did end up being a valuable discussion. If you haven't seen the posts yet, the conversation continued on /r/golang. I want to update this thread to point at my latest post there, proposing that the Googlers who are moderators all step

[go-nuts] Re: http2 client/server reversal performance

2016-12-08 Thread jonathan . gaillard
Anyone mind lending some weight/priority to a fix for the issue above? :D On Saturday, November 19, 2016 at 6:19:50 PM UTC-8, jonathan...@gmail.com wrote: > > https://github.com/golang/go/issues/17985 > -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] go generate "pipelines"

2016-12-08 Thread Paul Jolly
> > I'm quite happy with the semantics as described by `go generate --help`. > All I think I need is a simple wrapper to automate this pipeline approach > and make it non-project specific; for us it's come up in a couple of > places, but admittedly never more than a two-step pipeline. > I've

Re: [go-nuts] Downloading go1

2016-12-08 Thread Edward Muller
Thank You! On Fri, Dec 2, 2016 at 5:25 PM Brad Fitzpatrick wrote: > Thanks! > > > On Fri, Dec 2, 2016 at 4:53 PM, Will Norris wrote: > > > https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/go/go.go1.darwin-386.pkg > >

[go-nuts] Re: Go @ Work

2016-12-08 Thread jeffr
On Friday, March 30, 2012 at 10:27:36 AM UTC-7, hcatlin wrote: > > Just thought I'd stop in and post something saying "hi" to the group. > I work at > Moovweb where we power some of the biggest e-commerce sites' mobile > experience > on our platform. Our platform has super strong demands on

Re: [go-nuts] go install seems to do a lot of rebuilding in a container

2016-12-08 Thread shaun
I've started with a clean pkg dir. It's odd; the mtimes look correct (same inside/outside container). the "buildid" to the compile commands s the same on each run too. Does anyone know if there's a way to print out the "StaleReason" that the code collects, that might help me find out what

Re: [go-nuts] xml omitempty for sub-elements

2016-12-08 Thread C Banning
https://play.golang.org/p/aMtZhha073 On Thursday, December 8, 2016 at 10:09:17 AM UTC-7, Peter Kleiweg wrote: > > Four years later, and this still hasn't been fixed. The conversation you > are linking to has been locked. What can we do? File a new bug report? > > > Op donderdag 15 november 2012

Re: [go-nuts] go install seems to do a lot of rebuilding in a container

2016-12-08 Thread Ian Lance Taylor
On Thu, Dec 8, 2016 at 10:13 AM, wrote: > I've started with a clean pkg dir. > > It's odd; the mtimes look correct (same inside/outside container). the > "buildid" to the compile commands s the same on each run too. > > Does anyone know if there's a way to print out the

Re: [go-nuts] Golang text template - time.Format epoch

2016-12-08 Thread Marvin Renich
* 'Sergey Krutsko' via golang-nuts [161208 02:12]: > Thanks Marvin! > > that's exactly what i need > > bwt, is there any way to get current timestamp inside the template (without > referencing to the data structure) ? > > something like that: > "timestamp:

[go-nuts] Re: Idiomatic way of handling http requests in separate goroutines

2016-12-08 Thread Pablo Rozas-Larraondo
Thank you Tamás, I like the concept of blocking on select in the handler until a worker closes the channel. I don't know why but every time I use a WaitGroup I have the impression that the same thing can be done better. I'll try to implement it with the context library first as I'm very

Re: [go-nuts] Re: Isn't the use of Context in db/sql non-diomatic?

2016-12-08 Thread Chandru
Bump -- Chandra Sekar.S On Wed, Dec 7, 2016 at 10:24 AM, Chandru wrote: > I can understand db/sql using Context for cancellation. It is the optional > arguments to BeginContext like IsolationLevel and read-only flag, which are > not request-specific, that seem to

[go-nuts] is there bug with keyword "select" implementation?

2016-12-08 Thread Freeman Feng
Hello, I found that if I use timeout mixed with another chan which is heavily communicated with other goroutines, it could lead to dead lock or something inside select Here is the codes: for { select { case x := <-ch: // handling business logic begin (about 38+ message pushed to this chan at

[go-nuts] Upload streaming (chunking) with net/http/httputil's ReverseProxy?

2016-12-08 Thread Gabi Zuniga
ReverseProxy seems to forward the request only once the body is completely received. In fact it seems like the http.Handler semantics are the same. Is there a way to handle each chunk as it is received by the server, kind like node.js does? Otherwise are there alternative libraries that support

Re: [go-nuts] is there bug with keyword "select" implementation?

2016-12-08 Thread Ian Lance Taylor
On Thu, Dec 8, 2016 at 7:44 PM, Freeman Feng wrote: > > I found that if I use timeout mixed with another chan which is heavily > communicated with other goroutines, it could lead to dead lock or something > inside select > > Here is the codes: > > for { > select { > case x

[go-nuts] Implement ClusterClient Pipeline with transaction using go-redis package

2016-12-08 Thread plsd01p
My requirement is to implement pipelining and transactions both with a clusterclient using go-redis .How do I do this? -- 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