Re: [go-nuts] Re: x/mobile: Samples for reverse binding in gomobile

2019-09-12 Thread Jay Sharma
Hello Elias, Following are the lines from proposals: Creating new Java instances To create a new instance of a Java class, use the New function defined in the class package. For example: import ( "Java/java/lang/Object" "Java/java/lang" ) func NewObject() lang.Object { return Object.Ne

Re: [go-nuts] Code has OOP smells but I can't think of a better refactor

2019-09-12 Thread Shinichi Kudo
Thank you! In the end I forgot that I had introduced the Helpers because I needed a higher level mocking point for something that mostly won't use Context - but then I found a powerful new tool, closures. Those solved the elegance problem completely. Andrew Chiw On 03.09.19 21:06, burak serda

[go-nuts] How to perform dynamic unmarsahlling

2019-09-12 Thread afriyie . abraham
Can anyone help me perform dynamic unmarshalling depending on the type of messages received from a diameter client. In the code below, I have to two structures which represent two different messages received by a diameter server. I would like to modify the current code which unmarshals the requ

Re: [go-nuts] Re: x/mobile: Samples for reverse binding in gomobile

2019-09-12 Thread Jay Sharma
*Hello Elias,* *Following is my java file: * package reversebinding; public class RBinding { public static String getStringFromJava() { return "Hello from java !!"; } } *I tried the following in my go file : * import "Java/reversebinding/RBinding" // creating object like

Re: [go-nuts] nested or sub template by variable

2019-09-12 Thread Space A.
Just use {{if}}...{{elseif}} statements that will check .MainContent equality to specific value and will invoke specific {{template ...}} On Wednesday, September 11, 2019 at 3:40:22 PM UTC+3, dun...@gmail.com wrote: > > > > On Tuesday, April 17, 2012 at 2:52:03 PM UTC+1, Rob 'Commander' Pike

Re: [go-nuts] Re: x/mobile: Samples for reverse binding in gomobile

2019-09-12 Thread Elias Naur
On Thu Sep 12, 2019 at 2:35 AM Jay Sharma wrote: > > *Hello Elias,* > > *Following is my java file: * > > > package reversebinding; > > public class RBinding { > public static String getStringFromJava() { > return "Hello from java !!"; > } > } > > > Your Java method is declare

Re: [go-nuts] Re: x/mobile: Samples for reverse binding in gomobile

2019-09-12 Thread Jay Sharma
Hello Elias, *First of all, Thank you very much for help. :)* *After I remove the static from function it worked well. * *Thanks* On Thursday, September 12, 2019 at 4:31:05 PM UTC+5:30, Elias Naur wrote: > > On Thu Sep 12, 2019 at 2:35 AM Jay Sharma wrote: > > > > *Hello Elias,* > > > > *

Re: [go-nuts] How to perform dynamic unmarsahlling

2019-09-12 Thread burak serdar
On Thu, Sep 12, 2019 at 2:33 AM wrote: > > Can anyone help me perform dynamic unmarshalling depending on the type of > messages received from a diameter client. In the code below, I have to two > structures which represent two different messages received by a diameter > server. I would like to

Re: [go-nuts] An old problem: lack of priority select cases

2019-09-12 Thread trishcancer79
Why not just set up priority blockers against the one -- 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. To view this discu

Re: [go-nuts] How to perform dynamic unmarsahlling

2019-09-12 Thread Dimas Prawira
Hi Abraham, To perform dynamic unmarshal, you can use reflect package in Go. May this reference give help : https://zenidas.wordpress.com/recipes/dynamic-unmarshalling-in-golang/ Thank you On Thu, Sep 12, 2019, 3:33 PM wrote: > Can anyone help me perform dynamic unmarshalling depending on th

Re: [go-nuts] Re: CGO: How to link static library across dependent packages?

2019-09-12 Thread bkirsch1000
Did you find the solution to this problem? I think I might have the same problem. Also, if there is useful info, and it's not too much trouble, can you link to the issue you opened? Thanks On Sunday, October 30, 2016 at 9:18:27 AM UTC-7, Sriram wrote: > > Sure will do that.. Thanks Ian > > On

Re: [go-nuts] What happens if the hash retrieved from sumdb and the one in go.sum file of the main module are different?

2019-09-12 Thread T L
On Wednesday, September 11, 2019 at 5:33:02 PM UTC-4, Ian Lance Taylor wrote: > > The go tool reports a checksum mismatch error. > > Ian > "go help module-auth" says If a downloaded module is not yet included in go.sum and it is a publicly available module, the go command consults the Go che

Re: [go-nuts] Re: Running golang compiled binary on QNX

2019-09-12 Thread Wojciech S. Czarnecki
On Wed, 11 Sep 2019 05:45:18 -0700 (PDT) scab...@gmail.com wrote: > Right. I could have my question better. > The real question is whether there is any hope of QNX support in go. If you work for a company that pays a few million bucks yearly for qnx licenses AFAIK BlackBerry will be happy to do

Re: [go-nuts] An old problem: lack of priority select cases

2019-09-12 Thread T L
On Thursday, September 12, 2019 at 11:22:35 AM UTC-4, trishc...@gmail.com wrote: > > Why not just set up priority blockers against the one What does priority blockers mean? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

[go-nuts] Type inference inside struct literals? Pretty Please?

2019-09-12 Thread Nate Finch
I wish go's type inference worked inside struct literals. Filling out config structs would be so much easier if this worked: type Config struct { Runtime struct { Debug bool } } c := Config{ Runtime: { Debug: true, }, } ^^ why can't this work? It seems unambiguous. The initial

Re: [go-nuts] Type inference inside struct literals? Pretty Please?

2019-09-12 Thread Ian Lance Taylor
On Thu, Sep 12, 2019 at 2:02 PM Nate Finch wrote: > > I wish go's type inference worked inside struct literals. Filling out config > structs would be so much easier if this worked: > > type Config struct { > Runtime struct { > Debug bool > } > } > c := Config{ > Runtime: { > Debug:

[go-nuts] select on slice of channels

2019-09-12 Thread Andrey Tcherepanov
Folks, well, subj - why can't I "just" do a select on a slice of channels? Yes, I can run a bunch goroutines with of reads on an each channel, funnel it all into 1 notification channel, pick up on the other side... boring stuff, really... But why not "just" func main() { cc := make(

Re: [go-nuts] select on slice of channels

2019-09-12 Thread Ian Lance Taylor
On Thu, Sep 12, 2019 at 9:40 PM Andrey Tcherepanov wrote: > > well, subj - why can't I "just" do a select on a slice of channels? Yes, I > can run a bunch goroutines with of reads on an each channel, funnel it all > into 1 notification channel, pick up on the other side... boring stuff, > rea