Re: [go-nuts] alternate struct tags for json encode/decode?

2018-04-11 Thread Reed Wade
oh, cool! I had no idea that was doable (makes sense in retrospect but..). That would kind of suit a lot of the cases I care about. thanks, -reed On Thursday, 12 April 2018 00:57:20 UTC+12, Jan Mercl wrote: > > On Wed, Apr 11, 2018 at 2:50 PM Reed Wade <re...@typist.geek.nz

[go-nuts] Re: Language is a platform, which golang still does not pay attention to !!!

2018-04-11 Thread Reed Wade
So -- Go's fatal flaw is you can just deploy your code and run it instead of having to first install heaps of libs and config and maybe a jvm first? I'm certain that's not what was meant but that's how this reads. I guess the "I don't use Go" bit is the telling part. It doesn't look complex

[go-nuts] alternate struct tags for json encode/decode?

2018-04-11 Thread Reed Wade
More than once, I've found myself wanting to do something like this: package main import ( "encoding/json" "os" ) type Cake struct { Muffin string `json:"muffin" json2:"muffin"` Piestring `json:"pie" json2:"-"` Tuna string `json:"tuna" json2:"eel"` } func main() { c := Cake{"a",