THRIFT-3150 Add an option to make Read and Write methods private
Client: Go
Patch: Konstantin Shaposhnikov <k.shaposhnikov@gmail.com>, slightly modified by Jens Geyer

This closes #505
diff --git a/lib/go/test/Makefile.am b/lib/go/test/Makefile.am
index aa3d95b..8cedfb0 100644
--- a/lib/go/test/Makefile.am
+++ b/lib/go/test/Makefile.am
@@ -34,7 +34,9 @@
 				RefAnnotationFieldsTest.thrift \
 				ErrorTest.thrift \
 				NamesTest.thrift \
-				InitialismsTest.thrift
+				InitialismsTest.thrift \
+				DontExportRWTest.thrift \
+				dontexportrwtest/compile_test.go
 	mkdir -p gopath/src
 	grep -v list.*map.*list.*map $(THRIFTTEST) | grep -v 'set<Insanity>' > ThriftTest.thrift
 	$(THRIFT) $(THRIFTARGS) -r IncludesTest.thrift
@@ -49,9 +51,11 @@
 	$(THRIFT) $(THRIFTARGS) ErrorTest.thrift
 	$(THRIFT) $(THRIFTARGS) NamesTest.thrift
 	$(THRIFT) $(THRIFTARGS) InitialismsTest.thrift
+	$(THRIFT) $(THRIFTARGS),read_write_private DontExportRWTest.thrift
 	GOPATH=`pwd`/gopath $(GO) get code.google.com/p/gomock/gomock
 	ln -nfs ../../../thrift gopath/src/thrift
 	ln -nfs ../../tests gopath/src/tests
+	cp -r ./dontexportrwtest gopath/src
 	touch gopath
 
 check: gopath
@@ -63,8 +67,9 @@
 				refannotationfieldstest \
 				errortest	\
 				namestest \
-				initialismstest
-	GOPATH=`pwd`/gopath $(GO) test thrift tests
+				initialismstest \
+				dontexportrwtest
+	GOPATH=`pwd`/gopath $(GO) test thrift tests dontexportrwtest
 
 clean-local:
 	$(RM) -r gopath ThriftTest.thrift gen-go
@@ -86,4 +91,5 @@
 	TypedefFieldTest.thrift \
 	ErrorTest.thrift \
 	NamesTest.thrift \
-	InitialismsTest.thrift
+	InitialismsTest.thrift \
+	DontExportRWTest.thrift