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/Makefile.am b/lib/go/Makefile.am
index d7f9b27..06399f5 100644
--- a/lib/go/Makefile.am
+++ b/lib/go/Makefile.am
@@ -23,6 +23,12 @@
SUBDIRS += test test/fuzz
endif
+if GOVERSION_GE_118
+GOBUILDEXTRA = -buildvcs=false
+else
+GOBUILDEXTRA =
+endif
+
install:
@echo '##############################################################'
@echo '##############################################################'
@@ -30,14 +36,17 @@
@echo '##############################################################'
@echo '##############################################################'
+# NOTE: We have to disable stdmethods in go vet until
+# https://github.com/golang/go/issues/52445 is fixed.
check-local:
+ $(GO) vet -mod=mod -stdmethods=false github.com/apache/thrift/lib/go/thrift
$(GO) test -mod=mod -race ./thrift
clean-local:
$(RM) -rf pkg
all-local:
- $(GO) build -mod=mod ./thrift
+ $(GO) build $(GOBUILDEXTRA) -mod=mod ./thrift
EXTRA_DIST = \
thrift \