Skip to content

Commit

Permalink
THRIFT-5744: Switch to slog for go library
Browse files Browse the repository at this point in the history
Client: go
  • Loading branch information
fishy committed Nov 22, 2023
1 parent a06eedc commit f4c63e2
Show file tree
Hide file tree
Showing 12 changed files with 321 additions and 82 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ jobs:
strategy:
matrix:
go:
- '1.20'
- '1.21'
# TODO: Add 1.22 when it's released
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
run: make -C test/go precross

- name: Upload go precross artifacts
if: matrix.go == '1.21'
if: matrix.go == '1.21' # TODO: change to 1.22 when it's released
uses: actions/upload-artifact@v3
with:
name: go-precross
Expand Down
2 changes: 1 addition & 1 deletion LANGUAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Thrift's core protocol is TBinary, supported by all languages except for JavaScr
<td align=left><a href="https://github.com/apache/thrift/blob/master/lib/go/README.md">Go</a></td>
<!-- Since -----------------><td>0.7.0</td>
<!-- Build Systems ---------><td><img src="/doc/images/cgrn.png" alt="Yes"/></td><td><img src="/doc/images/cred.png" alt=""/></td>
<!-- Language Levels -------><td>1.20</td><td>1.21</td>
<!-- Language Levels -------><td>1.21</td><td>1.22</td>
<!-- Field types -----------><td><img src="/doc/images/cred.png" alt=""/></td>
<!-- Low-Level Transports --><td><img src="/doc/images/cred.png" alt=""/></td><td><img src="/doc/images/cred.png" alt=""/></td><td><img src="/doc/images/cgrn.png" alt="Yes"/></td><td><img src="/doc/images/cred.png" alt=""/></td><td><img src="/doc/images/cgrn.png" alt="Yes"/></td><td><img src="/doc/images/cgrn.png" alt="Yes"/></td>
<!-- Transport Wrappers ----><td><img src="/doc/images/cgrn.png" alt="Yes"/></td><td><img src="/doc/images/cgrn.png" alt="Yes"/></td><td><img src="/doc/images/cgrn.png" alt="Yes"/></td><td><img src="/doc/images/cgrn.png" alt="Yes"/></td>
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/apache/thrift

go 1.20
go 1.21
8 changes: 6 additions & 2 deletions lib/go/test/fuzz/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@
# under the License.
#

# Starting from go 1.21 `go mod init` will generate the go line as:
# go 1.21.4
# which will require the go.mod at fuzz to have a matching version,
# so use sed to get rid of the patch version.
gopathfuzz: $(THRIFT) fuzz.go
$(THRIFT) -r --gen go:thrift_import=github.com/apache/thrift/lib/go/thrift$(COMPILER_EXTRAFLAG) ../../../../tutorial/tutorial.thrift
cd gen-go/shared && go mod init shared
cd gen-go/tutorial && go mod init tutorial
cd gen-go/shared && go mod init shared && sed 's/^go 1\.\([0-9]*\).*$$/go 1.\1/g' go.mod > go.mod.new && mv go.mod.new go.mod
cd gen-go/tutorial && go mod init tutorial && sed 's/^go 1\.\([0-9]*\).*$$/go 1.\1/g' go.mod > go.mod.new && mv go.mod.new go.mod
touch gopathfuzz

check: gopathfuzz
Expand Down
2 changes: 1 addition & 1 deletion lib/go/test/fuzz/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/apache/thrift/lib/go/test/fuzz

go 1.20
go 1.21

replace github.com/apache/thrift => ../../../../

Expand Down
13 changes: 0 additions & 13 deletions lib/go/test/fuzz/go.sum
Original file line number Diff line number Diff line change
@@ -1,13 +0,0 @@
github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
2 changes: 1 addition & 1 deletion lib/go/test/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/apache/thrift/lib/go/test

go 1.20
go 1.21

require (
github.com/apache/thrift v0.0.0-00010101000000-000000000000
Expand Down
Loading

0 comments on commit f4c63e2

Please sign in to comment.