Generate go interfaces for gomock testing from thrift files by Antlr4.
Run
thrift2interface -n=mypkg -p=prefix/ -t=./thrift/base.thrift
would output
// Code generated by thrift2interface. DO NOT EDIT.
package mypkg
import (
"context"
rootCommonStructStruct "prefix/thrift_gen/root_common/struct/struct"
)
type BaseOneInterface interface {
ServiceOne(ctx context.Context) (err error)
ServiceTwo(ctx context.Context, request *rootCommonStructStruct.XStruct) (err error)
ServiceThree(ctx context.Context) (response *rootCommonStructStruct.YStruct, err error)
ServiceFive(ctx context.Context, request *rootCommonStructStruct.XStruct) (response *rootCommonStructStruct.YStruct, err error)
ServiceSeven(ctx context.Context) (err error)
ServiceEleven(ctx context.Context, request *rootCommonStructStruct.XStruct) (err error)
}