proto/goutils/proto_build/tpls/http_grpc_method_file_test.tpl

22 lines
325 B
Smarty
Raw Normal View History

2023-11-27 09:36:02 +00:00
package test
import (
"{{.ProjectName}}/gen/go/service"
"fusen-basic/utils/log"
"testing"
)
// 只需要填写参数
func init() {
{{.RequestVar}} = &service.{{.RequestStruct}}{}
}
2023-12-06 09:13:51 +00:00
2023-11-27 09:36:02 +00:00
func Test{{.MethodName}}RPC(t *testing.T) {
resp, err := {{.MethodName}}RPC()
if err != nil {
t.Error(err)
}
log.Println(resp)
}