Go-to-thrift is a compiler that compiles golang file to thrift IDL.
Note: before executing the following commands, make sure your GOPATH
environment is properly set.
Using go install
:
GO111MODULE=on go install github.com/qwsc/go-to-thrift@latest
To compile a golang file to thrift IDL with the default setting, you can just run:
go-to-thrift the-golang-file.go