[go-nuts] Need help in in implementing a method on an interface

2018-04-24 Thread rickyusminer
Hello all, I am golang beginner. And I have a problem with interfaces. Here is the problem where I have one main package with has an Interface I. and multiple sub packages each implementing interface I. So I have a method which is exactly the same for all sub packages. Is there a way I can imp

[go-nuts] Re: Need help in in implementing a method on an interface

2018-04-24 Thread rickyusminer
Hi Alex, Thanks for the response. Apologies for the confusion. The Generic method indeed uses struct fields from P1data/P2data struct(they are all same structs). Can I still achieve this? From the below. GenericMethod should read name field from structs. //package p1 type P1data struct { name

[go-nuts] Why can't I see the whole stack trace of goroutine

2018-11-06 Thread rickyusminer
I have a lot of leaking goroutines in my code over a span of time. I am trying to debug it but I can't seem to figure out from where these are occuring from. Any help in finding the source is helpful. goroutine 2329 [select, 1281 minutes]: net/http.(*persistConn).readLoop(0xc420a80120)