You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2016/12/10 00:55:42 UTC

thrift git commit: THRIFT-3998 Document ability to add custom tags to thrift structs Client: Go Patch: Richard Artoul

Repository: thrift
Updated Branches:
  refs/heads/master 7ab125a25 -> c3a3f653b


THRIFT-3998 Document ability to add custom tags to thrift structs
Client: Go
Patch: Richard Artoul <ri...@gmail.com>

This closes #1053


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/c3a3f653
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/c3a3f653
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/c3a3f653

Branch: refs/heads/master
Commit: c3a3f653b66b7cccf61c936dc349de27b8a18899
Parents: 7ab125a
Author: Richard Artoul <ri...@gmail.com>
Authored: Fri Jul 22 14:26:53 2016 -0700
Committer: Jens Geyer <je...@apache.org>
Committed: Sat Dec 10 01:54:54 2016 +0100

----------------------------------------------------------------------
 lib/go/README.md | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/c3a3f653/lib/go/README.md
----------------------------------------------------------------------
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 @@ As such, we provide some helpers that do just this under lib/go/thrift/. E.g.,
 
 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"`
+    }