Eliminate my previous answer - it is undocumented, but it's possible, I found it by reading the compiler code. Bah.
But in any case, in economical master (1.0-dev), here's how to do it - using annotation go.tag.
This thrift code:
struct foo {
1: string bar (go.tag = "json:\"baz\" yo:\"dawg\""),
2: string bang
}
Generates the following Go code:
type Foo struct {
Bar string `thrift:"bar,1" json:"baz" yo:"dawg"`
Bang string `thrift:"bang,2" json:"bang"`
}
source
share