diff options
author | Yuxuan 'fishy' Wang <yuxuan.wang@reddit.com> | 2022-08-02 11:31:14 -0700 |
---|---|---|
committer | Yuxuan 'fishy' Wang <fishywang@gmail.com> | 2022-08-02 22:19:43 -0700 |
commit | 3f9b7d0da2d6f41b57cd636fa3b6067737befe4c (patch) | |
tree | 7775b5f5eb0e2711331eeb340eeb6b4e6378bec7 /lib/go | |
parent | 892b6731eedcf81e6ba9627327676cddb009fc07 (diff) | |
download | thrift-3f9b7d0da2d6f41b57cd636fa3b6067737befe4c.tar.gz |
Update supported go version to 1.18.* and 1.19.*
Client: go
Also provide generic version of Pointer helper function.
Diffstat (limited to 'lib/go')
-rw-r--r-- | lib/go/test/fuzz/go.mod | 2 | ||||
-rw-r--r-- | lib/go/thrift/pointerize.go | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/go/test/fuzz/go.mod b/lib/go/test/fuzz/go.mod index 3cefa0204..c9ef373fc 100644 --- a/lib/go/test/fuzz/go.mod +++ b/lib/go/test/fuzz/go.mod @@ -1,6 +1,6 @@ module github.com/apache/thrift/lib/go/test/fuzz -go 1.16 +go 1.18 replace github.com/apache/thrift => ../../../../ diff --git a/lib/go/thrift/pointerize.go b/lib/go/thrift/pointerize.go index fb564ea81..e200c68b6 100644 --- a/lib/go/thrift/pointerize.go +++ b/lib/go/thrift/pointerize.go @@ -19,6 +19,12 @@ package thrift +// Pointer is the generic (type parameter) version of the helper function that +// converts types to pointer types. +func Pointer[T any](v T) *T { + return &v +} + /////////////////////////////////////////////////////////////////////////////// // This file is home to helpers that convert from various base types to // respective pointer types. This is necessary because Go does not permit |