Re: [go-nuts] Which is a best practice, long run goroutine or short term one?

2017-01-07 Thread T L
On Saturday, January 7, 2017 at 3:05:28 PM UTC+8, Lazytiger wrote: > > Actually, I meet two kind of crash, “pthread_create failed" and “out of > memory”. > But it’s kind of a heisenbug, I can’t always reproduce it. > The number of goroutines has no direct relations to “pthread_create failed".

Re: [go-nuts] enforce go source pretty printing

2017-01-07 Thread Christian Joergensen
On Friday, January 6, 2017 at 9:14:08 PM UTC+1, mhh...@gmail.com wrote: > > yeah, but this output of go/format.Print really hurts me bad, > Does everything really have to go directly in the initialization of your map? How about just going with something like this: https://play.golang.org/p/vqmzM

Re: [go-nuts] explain CLA terms

2017-01-07 Thread Xavier Combelle
Thanks for this answer. Le 07/01/2017 à 06:33, Will Norris a écrit : > The Google CLA is based on the Apache CLA > , which shares the same > copyright language as the Apache 2.0 License > (section 2). The vas

Re: [go-nuts] enforce go source pretty printing

2017-01-07 Thread mhhcbon
Might work indeed. Let s see if i feel in such struggle that i rewrite the KeyValueExpr to some sort of map assignments. thanks! On Saturday, January 7, 2017 at 10:42:25 AM UTC+1, Christian Joergensen wrote: > > On Friday, January 6, 2017 at 9:14:08 PM UTC+1, mhh...@gmail.com wrote: >> >> yeah

Re: [go-nuts] Using Go in a locked down SOC2 environment (dependency management hell)

2017-01-07 Thread Tamás Gulácsi
You asked a solution for your locked-down build servers, what the proxy solution solves easily. For developer lock-in, you have to create a git hook to limit to libraries only in the repo mirror. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group.

Re: [go-nuts] enforce go source pretty printing

2017-01-07 Thread C Banning
Or this: https://play.golang.org/p/GF97Pk0gbv On Saturday, January 7, 2017 at 4:12:01 AM UTC-7, mhh...@gmail.com wrote: > > Might work indeed. > > Let s see if i feel in such struggle that i rewrite the KeyValueExpr to > some sort of map assignments. > > thanks! > > On Saturday, January 7, 2017 a

Re: [go-nuts] enforce go source pretty printing

2017-01-07 Thread C Banning
How would this work for you: https://play.golang.org/p/totWmcs8Om On Saturday, January 7, 2017 at 4:12:01 AM UTC-7, mhh...@gmail.com wrote: > > Might work indeed. > > Let s see if i feel in such struggle that i rewrite the KeyValueExpr to > some sort of map assignments. > > thanks! > > On Saturda

[go-nuts] does the syscall package allow zero bytes in the filename?

2017-01-07 Thread anmol via golang-nuts
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

[go-nuts] Re: request reflection and closure supports on gccgo 5.0.0 on MIPS

2017-01-07 Thread kiran . happy
Hi, I tried to build gccgo(i586 no MMX) with crosstool-ng and it always fails( 1.22 release or github master ). Is it possible to share your version of crosstool-ng ? Any version of gcc is fine. On Wednesday, March 11, 2015 at 2:55:14 PM UTC+5:30, andrewc...@gmail.com wrote: > > Forgot link: ht

Re: [go-nuts] does the syscall package allow zero bytes in the filename?

2017-01-07 Thread Ian Lance Taylor
On Sat, Jan 7, 2017 at 7:00 AM, anmol via golang-nuts wrote: > Was the suggestion from this commit > https://github.com/golang/go/commit/706832a0882c7300889238d5f4d476dc2ee83ad0 > ever implemented? Yes: https://golang.org/cl/6458050 . Ian -- You received this message because you are subscribed

[go-nuts] Re: enforce go source pretty printing

2017-01-07 Thread mhhcbon
Ideally, its some option to pass to, //PrintAstFile prints an ast to given writer. func PrintAstFile(w io.Writer, node *ast.File) error { fset := token.NewFileSet() return format.Node(w, fset, node) } On Friday, January 6, 2017 at 7:57:00 PM UTC+1, mhh...@gmail.com wrote: > > Hi, > > i

[go-nuts] [JOB] Intermediate/Senior Developer at OneConfig

2017-01-07 Thread Vitaly Dyatlov
"Minimum 5 years of Go programming experience" - that made me smile.. 5 years ago Go 1.0 was released.. And it was that time when close to none knew about it.. not speaking of big projects and production systems.. -- You received this message because you are subscribed to the Google Groups "gol

Re: [go-nuts] [JOB] Intermediate/Senior Developer at OneConfig

2017-01-07 Thread Jan Mercl
On Sat, Jan 7, 2017 at 10:30 PM Vitaly Dyatlov wrote: > "Minimum 5 years of Go programming experience" - that made me smile.. > 5 years ago Go 1.0 was released.. And it was that time when close to none knew about it.. not speaking of big projects and production systems.. Full time employee codin

Re: [go-nuts] Efficient ForEach() on a map protected by a mutex

2017-01-07 Thread Dragos Harabor
> > > > Is there a better way? > > Is fn allowed to mutate the map? If not then the locking/unlocking is not > necessary at all. If yes then there's a race between acquiring the k,v pair > from the map under a lock and calling fn with those, now possibly obsolete > values. > Even if fn does no

[go-nuts] Re: Efficient ForEach() on a map protected by a mutex

2017-01-07 Thread 'Keith Randall' via golang-nuts
On Friday, January 6, 2017 at 5:12:54 PM UTC-8, tsuna wrote: > > Hi there, > I have a struct that contains an unexported map protected by a mutex, > let’s say something like: > > type Map struct { > mtx sync.Mutex > col map[string]interface{} > } > > I want to implement a ForEach method that wor

[go-nuts] json.Marshal... what am I doing wrong here?

2017-01-07 Thread Eric Brown
Simple example... what am I doing wrong? https://play.golang.org/p/WR9yehNF5_ -- 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...@googlegroup

Re: [go-nuts] Re: json.Marshal... what am I doing wrong here?

2017-01-07 Thread Shawn Milochik
Not only rookie. I've done it a number of times. 😎 On Jan 8, 2017 01:35, "Eric Brown" wrote: > > > On Sunday, January 8, 2017 at 12:30:43 AM UTC-6, Eric Brown wrote: >> >> Simple example... what am I doing wrong? >> >> https://play.golang.org/p/WR9yehNF5_ >> > > Found the mistake. I limited the

Re: [go-nuts] Re: json.Marshal... what am I doing wrong here?

2017-01-07 Thread Eric Brown
Hahaha... thanks, Shawn. Appreciate the assistance. On Sunday, January 8, 2017 at 12:37:16 AM UTC-6, Shawn Milochik wrote: > > Not only rookie. I've done it a number of times. 😎 > > On Jan 8, 2017 01:35, "Eric Brown" > wrote: > >> >> >> On Sunday, January 8, 2017 at 12:30:43 AM UTC-6, Eric Brown

Re: [go-nuts] json.Marshal... what am I doing wrong here?

2017-01-07 Thread Shawn Milochik
You have to export any fields to marshal, or other packages (including encoding/json) can't see them. https://play.golang.org/p/W5R4oH0oUR On Jan 8, 2017 01:30, "Eric Brown" wrote: > Simple example... what am I doing wrong? > > https://play.golang.org/p/WR9yehNF5_ > > -- > You received this mes

[go-nuts] Re: json.Marshal... what am I doing wrong here?

2017-01-07 Thread Eric Brown
On Sunday, January 8, 2017 at 12:30:43 AM UTC-6, Eric Brown wrote: > > Simple example... what am I doing wrong? > > https://play.golang.org/p/WR9yehNF5_ > Found the mistake. I limited the scope of the structure fields by not capitalizing them. Once I did, it worked as expected. Rookie mistak

[go-nuts] Multiple goroutine timeout for waitgroup not working

2017-01-07 Thread desaiabhijit
Can you please help to correct below program where timeout not seems working Work 1 - have 1 second Work 2 - have 3 second Total Timeout - 2 sec program wait for entire 3 seconds and return both values rather than value from Work 1 Program > package main import ( "fmt" "time" "sync" ) type

[go-nuts] Using Go in a locked down SOC2 environment (dependency management hell)

2017-01-07 Thread Damian Gryski
I've seen this sort of question on the mailong list before. Probably a good idea to gather potential solutions on the Wiki somewhere. Damian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emai

Re: [go-nuts] Re: Efficient ForEach() on a map protected by a mutex

2017-01-07 Thread tsuna
On Sat, Jan 7, 2017 at 7:00 PM, 'Keith Randall' via golang-nuts < golang-nuts@googlegroups.com> wrote: > > > On Friday, January 6, 2017 at 5:12:54 PM UTC-8, tsuna wrote: >> >> Hi there, >> I have a struct that contains an unexported map protected by a mutex, >> let’s say something like: >> >> type