[go-nuts] Function not working like I think it should?

2018-08-18 Thread Tamás Gulácsi
Use pointers for the window structs. -- 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://gro

[go-nuts] Function not working like I think it should?

2018-08-18 Thread rob . shelby
Hi all! I'm hoping any of you could checkout my Golang question on Stack? https://stackoverflow.com/questions/51911363/passing-results-in-go-and-wxgo I really didn't know what to search for on this one. Thank you!! -- You received this message because you are subscribed to the Google Groups "g

[go-nuts] help with using crc32.Update for BE data.

2018-08-18 Thread Dan Kortschak
I am working on an MPEG-TS-using package at the moment and need to calculate CRC32 remainders for the packets I'm constructing. I can do this with a big-endian CRC32 update function (here https://play.golang. org/p/nKnRHlhTkNT), but am struggling to figure out how to transform the inputs to use the

Re: [go-nuts] Re: Ternary ... again

2018-08-18 Thread Liam Breck
Normally the FooBar is full of other fields, necessitating the single field patch. On Sat, Aug 18, 2018, 1:17 PM Tim Peoples wrote: > Regarding your issues with the following... > > >> I've lost count of the times I've had to change: >> >> return FooBar{ >> Field: blah, >> } >> >> To: >> >>

Re: [go-nuts] Re: Ternary ... again

2018-08-18 Thread Tim Peoples
Regarding your issues with the following... > I've lost count of the times I've had to change: > > return FooBar{ > Field: blah, > } > > To: > > var foo FooBar > if someCond { > foo.Field = blah > } else { > foo.Field = bar > } > return foo > ...I hardly consider that to be idiomat

[go-nuts] Re: Fake SMTP server based on tiedot

2018-08-18 Thread rohitpatwari
Does anyone know how to send emails to inbucket if its running in windows . On Sunday, 27 April 2014 00:25:01 UTC+5:30, Benjamin BALET wrote: > > Hello, > > Today was rainy so I forked Guerrilla-SMTPd server to create a fake SMTP > server with a minimalist webmail client. Mails are neither relay

Re: [go-nuts] Safeness of using reflect.Type as a map key instead of reflect.Type.Name() ?

2018-08-18 Thread roger peppe
Yes, it's conventional to use reflect.Type as a map key. In fact, you should do that because not all types have different names, even if they're in the same package. For example: https://play.golang.org/p/Xqc8hkKPu4_v On 18 August 2018 at 10:40, Christophe Meessen wrote: > I need to index data b

Re: [go-nuts] Safeness of using reflect.Type as a map key instead of reflect.Type.Name() ?

2018-08-18 Thread Sebastien Binet
Bonjour Christophe, Yes, it is safe to use reflect.Type as a key. Even if that type was loaded from another shared library through 'plugin'. At least that's how it is supposed to work :) -s sent from my droid On Sat, Aug 18, 2018, 11:40 Christophe Meessen wrote: > I need to index data by typ

[go-nuts] Safeness of using reflect.Type as a map key instead of reflect.Type.Name() ?

2018-08-18 Thread Christophe Meessen
I need to index data by type and I have two options: - use a string as key and index the string returned by reflect.Type.Name() - use reflect.Type as key I have the impression that indexing by reflect.Type would be slightly more speed and space efficient, but I'm unsure if the relation between r