@@ -75,7 +75,9 @@ type {{$svrName}}Impl struct {}
75
75
76
76
{ { with .LeadingComments } }// { {$rpcName } } { {.} }{ { end } }
77
77
{ {- if and $method .ClientStreaming $method .ServerStreaming } }
78
- func (s *{ {$svrName } }Impl) { {$rpcName } }(stream { {index (splitList " ." $rpcReqType ) 0} }.{ {$svrNameCamelCase } }_{ {$rpcName } }Server) error {
78
+ func (s *{ {$svrName } }Impl) { {$rpcName } }(
79
+ stream { {index (splitList " ." $rpcReqType ) 0} }.{ {$svrNameCamelCase } }_{ {$rpcName } }Server,
80
+ ) error {
79
81
// Bidirectional streaming scenario processing logic (for reference only, please modify as needed).
80
82
for {
81
83
req, err := stream.Recv()
@@ -103,7 +105,9 @@ func (s *{{$svrName}}Impl) {{$rpcName}}(stream {{index (splitList "." $rpcReqTyp
103
105
}
104
106
}
105
107
{ {- else if $method .ClientStreaming } }
106
- func (s *{ {$svrName } }Impl) { {$rpcName } }(stream { {index (splitList " ." $rpcReqType ) 0} }.{ {$svrNameCamelCase } }_{ {$rpcName } }Server) error {
108
+ func (s *{ {$svrName } }Impl) { {$rpcName } }(
109
+ stream { {index (splitList " ." $rpcReqType ) 0} }.{ {$svrNameCamelCase } }_{ {$rpcName } }Server,
110
+ ) error {
107
111
// Client streaming scenario processing logic (for reference only, please modify as needed).
108
112
// all := []string{}
109
113
for {
@@ -128,7 +132,10 @@ func (s *{{$svrName}}Impl) {{$rpcName}}(stream {{index (splitList "." $rpcReqTyp
128
132
}
129
133
}
130
134
{ {- else if $method .ServerStreaming } }
131
- func (s *{ {$svrName } }Impl) { {$rpcName } }(req *{ {$rpcReqType } }, stream { {index (splitList " ." $rpcReqType ) 0} }.{ {$svrNameCamelCase } }_{ {$rpcName } }Server) error {
135
+ func (s *{ {$svrName } }Impl) { {$rpcName } }(
136
+ req *{ {$rpcReqType } },
137
+ stream { {index (splitList " ." $rpcReqType ) 0} }.{ {$svrNameCamelCase } }_{ {$rpcName } }Server,
138
+ ) error {
132
139
// Server streaming scenario processing logic (for reference only, please modify as needed).
133
140
log.Debugf(" StreamClient server receive %v" , req)
134
141
for i := 0; i < 5; i++ {
@@ -147,7 +154,10 @@ func (s *{{$svrName}}Impl) {{$rpcName}}(req *{{$rpcReqType}}, stream {{index (sp
147
154
return nil
148
155
}
149
156
{ {- else } }
150
- func (s *{ {$svrName } }Impl) { {$rpcName } }(ctx context.Context, req *{ {$rpcReqType } }) (*flatbuffers.Builder, error) {
157
+ func (s *{ {$svrName } }Impl) { {$rpcName } }(
158
+ ctx context.Context,
159
+ req *{ {$rpcReqType } },
160
+ ) (*flatbuffers.Builder, error) {
151
161
// Unary call: flatbuffers processing logic (for reference only, please modify as needed).
152
162
log.Debugf(" Simple server receive %v" , req)
153
163
// Replace ' Message' with the field name you want to operate on.
0 commit comments