[go-nuts] reflect, is it possible to get the [body + sign] of a func as text at runtime ?

2016-09-18 Thread 'Mihai B' via golang-nuts
The body is compiled so you can't get it via reflection. -- 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

[go-nuts] Interface{} constrains on specific types

2016-06-24 Thread 'Mihai B' via golang-nuts
I'm developing a json schema generator (json schema from Go ast and the other way around). There is a keyword "oneOf" which requires exactly one schema to be valid in this keyword's value. In Go I translate it by using an empty interface{}. The issue is that when I convert the interface{} to

[go-nuts] Unmarshalling and tags

2016-06-19 Thread 'Mihai B' via golang-nuts
Hi there, I have a struct that needs to be marshalled/unmarshalled using various serialization formats(xml, json, name/value). The tags start to represent a considerable effort[0] so I'm wondering if this is a common use case and if a change[1] to the encoding packages to specify the tag

[go-nuts] WebAssembly as a target

2016-06-19 Thread 'Mihai B' via golang-nuts
I don't think we can expect anything before wasm supports GC (i.e. Phase 3 on wasm roadmap). Once GC is supported(not very soon) Go could be compiled through llgo[0]. One issue could be the binary size(.i.e due /reflect) - Mihai [0] https://llvm.org/svn/llvm-project/llgo/trunk/README.TXT --