Update Go versions used in travis and LANGUAGES.md
Per our support policy, drop support of go 1.16 and add support of go
1.18.
Also enable go vet in make check, and fix issues reported by go vet.
diff --git a/lib/go/test/Makefile.am b/lib/go/test/Makefile.am
index 2cca411..e1cf8cd 100644
--- a/lib/go/test/Makefile.am
+++ b/lib/go/test/Makefile.am
@@ -17,6 +17,12 @@
# under the License.
#
+if GOVERSION_GE_118
+GOBUILDEXTRA = -buildvcs=false
+else
+GOBUILDEXTRA =
+endif
+
THRIFTARGS = -out gopath/src/ --gen go:thrift_import=github.com/apache/thrift/lib/go/thrift,package_prefix=github.com/apache/thrift/lib/go/test/gopath/src/$(COMPILER_EXTRAFLAG)
THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift
@@ -91,7 +97,7 @@
touch gopath
check: gopath
- $(GO) build -mod=mod \
+ $(GO) build $(GOBUILDEXTRA) -mod=mod \
./gopath/src/includestest \
./gopath/src/binarykeytest \
./gopath/src/servicestest \
diff --git a/lib/go/test/fuzz/Makefile.am b/lib/go/test/fuzz/Makefile.am
index 391c84a..a8a8102 100644
--- a/lib/go/test/fuzz/Makefile.am
+++ b/lib/go/test/fuzz/Makefile.am
@@ -33,4 +33,4 @@
fuzz.go \
fuzz_test.go \
go.mod \
- go.sum
+ go.sum