THRIFT-3998 Document ability to add custom tags to thrift structs
Client: Go
Patch: Richard Artoul <richardartoul@gmail.com>
This closes #1053
diff --git a/lib/go/README.md b/lib/go/README.md
index 1e14342..7440474 100644
--- a/lib/go/README.md
+++ b/lib/go/README.md
@@ -64,3 +64,18 @@
And so on. The code generator also creates analogous helpers for user-defined
typedefs and enums.
+
+Adding custom tags to generated Thrift structs
+==============================================
+
+You can add tags to the auto-generated thrift structs using the following format:
+
+ struct foo {
+ 1: required string Bar (go.tag = "some_tag:\"some_tag_value\"")
+ }
+
+which will generate:
+
+ type Foo struct {
+ Bar string `thrift:"bar,1,required" some_tag:"some_tag_value"`
+ }