[GitHub] thrift pull request #1507: THRIFT-4516: Fix "go vet" warnings for Go 1.10
Github user asfgit closed the pull request at: https://github.com/apache/thrift/pull/1507 ---
[GitHub] thrift pull request #1507: THRIFT-4516: Fix "go vet" warnings for Go 1.10
Github user dcelasun commented on a diff in the pull request: https://github.com/apache/thrift/pull/1507#discussion_r174812332 --- Diff: lib/go/test/dontexportrwtest/compile_test.go --- @@ -29,10 +28,10 @@ import ( func TestReadWriteMethodsArePrivate(t *testing.T) { // This will only compile if read/write methods exist s := NewTestStruct() - fmt.Sprintf("%v", s.read) - fmt.Sprintf("%v", s.write) + _ = s.read --- End diff -- The problem is `s.read` and `s.write` are functions and there just isn't any way to print functions as strings, so I had to find another way to use them without trying to stringify them. ---
[GitHub] thrift pull request #1507: THRIFT-4516: Fix "go vet" warnings for Go 1.10
Github user jeking3 commented on a diff in the pull request: https://github.com/apache/thrift/pull/1507#discussion_r174810986 --- Diff: lib/go/test/dontexportrwtest/compile_test.go --- @@ -29,10 +28,10 @@ import ( func TestReadWriteMethodsArePrivate(t *testing.T) { // This will only compile if read/write methods exist s := NewTestStruct() - fmt.Sprintf("%v", s.read) - fmt.Sprintf("%v", s.write) + _ = s.read --- End diff -- Nice.. I had done everything else but I had no idea how to fix this in golang. Thanks! ---
[GitHub] thrift pull request #1507: THRIFT-4516: Fix "go vet" warnings for Go 1.10
GitHub user dcelasun opened a pull request: https://github.com/apache/thrift/pull/1507 THRIFT-4516: Fix "go vet" warnings for Go 1.10 Opening this here because my free Travis account has its builds killed after 50 minutes. You can merge this pull request into a Git repository by running: $ git pull https://github.com/dcelasun/thrift THRIFT-4516 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/1507.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1507 commit a9efd1abd4fd4862d8e967ec207015af79494b6c Author: D. Can CelasunDate: 2018-03-15T11:52:37Z THRIFT-4516: Fix "go vet" warnings for Go 1.10 Client: go ---