[go-nuts] Re: Information for gophers in Ukraine

2022-02-26 Thread Anthony Martin
Yes, let's support everyone! If any gopher from the DNR or LNR is tired of their plight being ignored and wants to chat with a friendly US citizen from California, feel free to email me. Anthony -- You received this message because you are subscribed to the Google Groups "golang-nuts" group.

[go-nuts] Re: are Go generics more like C++ or more like Java?

2022-02-26 Thread Ugorji Nwoke
To your direct questions, the answer is a mix of both: C++ style where the generic block is a template and code is essentially generated for each type known at compile time with static dispatch, and java-like where it is similar to an interface call with dynamic dispatch. The compiler will stri

[go-nuts] Re: BPF target

2022-02-26 Thread twp...@gmail.com
https://tinygo.org/ might be a more suitable initial project for compiling Go to eBPF. A lot is already in place including an LLVM backend and a simplified Go runtime suitable for small systems. On Thursday, February 24, 2022 at 6:41:00 PM UTC+1 stalke...@protonmail.ch wrote: > With the Solana

[go-nuts] Information for gophers in Ukraine

2022-02-26 Thread Kamil Ziemian
I live in Poland in city of Cracov (https://en.wikipedia.org/wiki/Krak%C3%B3w) and at this moment I have one free room in my flat. If some gopher from Ukraine need a place to stay for himself/herself or for they loved ones, just write to me. I will try to help as much as I can. Kamil Ziemian

[go-nuts] Re: encoding/xml: Marshal struct field depending on value of another struct field

2022-02-26 Thread Steffen Wentzel
I'm just using pointers now, this approach seems to work fine for my purpose: https://go.dev/play/p/lMwZisTayt3 Steffen Wentzel schrieb am Samstag, 26. Februar 2022 um 11:00:49 UTC+1: > Dear community, > > how can we XML marshal a struct field depending on the value of another > struct field in

[go-nuts] encoding/xml: Marshal struct field depending on value of another struct field

2022-02-26 Thread Steffen Wentzel
Dear community, how can we XML marshal a struct field depending on the value of another struct field in the same struct? Playground Example: https://go.dev/play/p/vfRB-GfzZ54 My approaches so far: - Use a custom type for the Feature field and implement xml.Marshaler. However MarshalXML